package com.tc.resource;

import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

import org.jboss.resteasy.annotations.providers.jaxb.json.BadgerFish;
import org.springframework.beans.factory.annotation.Autowired;

import com.tc.erp.pojo.Account;
import com.tc.erp.service.IAccountService;
import com.tc.erp.service.impl.AccountService;
import com.tc.erp.util.AppContextUtils;

@Path("/login")
public class LoginResource {

	private IAccountService accountService;

	@POST
	@Produces("application/json")
	@BadgerFish
	public Account doLogin() {
		return accountService.findAccountByName("tongchang");
	}

	public IAccountService getAccountService() {
		return accountService;
	}

	public void setAccountService(IAccountService accountService) {
		this.accountService = accountService;
	}
}
